import Vue from "vue";
import VueRouter from "vue-router";
import MyIndex from "@/views/MyIndex.vue";
import MyGoods from "@/views/MyGoods.vue";
import MyInfo from "@/views/MyInfo.vue";
import MyLogin from "@/views/MyLogin.vue";
import MySprots from "@/views/MySprots.vue";
import NewSprots from "@/views/NewSprots.vue";
import CountrySprots from "@/views/CountrySprots";

Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    {
      path: "/index",
      component: MyIndex,
    },
    { path: "/goods", component: MyGoods },
    { path: "/info", component: MyInfo },
    {
      path: "/login",
      component: MyLogin,
      children: [
        { path: "mysprots", component: MySprots },
        { path: "newsprots", component: NewSprots },
        { path: "countrysports", component: CountrySprots },
      ],
    },
    {
      path: "/",
      component: MyIndex,
    },
  ],
});

export default router;
